home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / real / windows / r3tool.js < prev    next >
Encoding:
JavaScript  |  2005-04-04  |  8.3 KB  |  281 lines

  1.  
  2. // JavaScript wrapper for r3tool.h
  3. // Auto generated file, do not modify by hand
  4. // Copyright ⌐ 2004, Realsoft Graphics Oy
  5.  
  6. var R3_TOOL_H = 1;
  7. include("oops/r3button.js")
  8.  
  9.  
  10. var R3CLID_TOOL = 187;
  11.  
  12.  
  13.  
  14.  
  15. // Description: Executed when a tool is selected. This method is defined by the base class
  16. //      but it is up to the sub classes to implement this. Tool must call R3WGM_MAPCHANGES
  17. //      of its tool button with this method. When the tool is clicked by the user,
  18. //      this method is called. The tool must then send the NEWINTERACTOR method to the layer
  19. //      class.
  20. // Virtual method
  21. // Returns: Boolean, must be true.
  22.  
  23. R3TOOLM_ACTION = 187001;
  24.  
  25. function mR3TOOLM_ACTION() {
  26.   return   DoA(this.r3obj, 187001, 0, R3TID_INTEGER, 0);
  27. }
  28.  
  29. // Description: Class message. Install new tool for the toolbar.
  30. // Returns: Boolean, true if succeeded
  31. // p1: Integer, class id of the tool group
  32. // p3: Integer, class id of the tool
  33.  
  34. R3TOOLCM_INSTALLTOOLCLASS = 187002;
  35.  
  36. function mR3TOOLCM_INSTALLTOOLCLASS(p1, p3) {
  37.   return   DoA2(this.r3obj, 187002, p1, R3TID_INTEGER, 0, p3, R3TID_INTEGER, 0);
  38. }
  39.  
  40. // Description: Enumerates all installed tools. The given 'targetobject' is called with two parameters: p1 =
  41. //      (R3CLID)group, p3 = (R3CLID)tool.
  42. // p3: Tag[], R3RA_TargetObject, R3RA_TargetMethod    
  43.  
  44. R3TOOLCM_ENUMTOOLCLASSES = 187003;
  45.  
  46. function mR3TOOLCM_ENUMTOOLCLASSES(p3) {
  47.   Do(this.r3obj, 187003, p3, R3TID_TAG, R3TNF_ARRAY);
  48. }
  49.  
  50. // Description: Class method. Install new tool group.
  51. // Returns: Boolean, true if succeeded.
  52. // p1: Integer, class id of the group
  53. // p3: String, symbolic name for the group.
  54.  
  55. R3TOOLCM_INSTALLTOOLGROUP = 187005;
  56.  
  57. function mR3TOOLCM_INSTALLTOOLGROUP(p1, p3) {
  58.   return   DoA2(this.r3obj, 187005, p1, R3TID_INTEGER, 0, p3, R3TID_STRING, 0);
  59. }
  60.  
  61. // Description: Show info message
  62. // p3: String, message to be shown
  63.  
  64. R3TOOLM_SHOWMESSAGE = 187007;
  65.  
  66. function mR3TOOLM_SHOWMESSAGE(p3) {
  67.   DoA(this.r3obj, 187007, p3, R3TID_STRING, 0);
  68. }
  69.  
  70. // Description: Sets the orientation of the second line
  71. // Virtual method
  72.  
  73. R3TOOLM_SETCONTROLORIENTATIO = 187008;
  74.  
  75. function mR3TOOLM_SETCONTROLORIENTATIO() {
  76.   DoA(this.r3obj, 187008, 0, R3TID_INTEGER, 0);
  77. }
  78.  
  79. // Description: Sets the orientation of the status line
  80. // Virtual method
  81.  
  82. R3TOOLM_SETSTATUSORIENTATION = 187009;
  83.  
  84. function mR3TOOLM_SETSTATUSORIENTATION() {
  85.   DoA(this.r3obj, 187009, 0, R3TID_INTEGER, 0);
  86. }
  87.  
  88. // Description: Reads the default options from the interactor. Defaults are used when the interactor is
  89. //      activated.
  90. // Virtual method
  91.  
  92. R3TOOLM_MAKEDEFAULTS = 187010;
  93.  
  94. function mR3TOOLM_MAKEDEFAULTS() {
  95.   DoA(this.r3obj, 187010, 0, R3TID_INTEGER, 0);
  96. }
  97.  
  98. // Description: Enumerates groups and tools
  99. // p1: Integer, group id
  100. // p2: String, group name
  101. // p3: Integer, tool id    
  102.  
  103. R3TOOLCM_ENUMGROUPSANDTOOLS = 187011;
  104.  
  105. function mR3TOOLCM_ENUMGROUPSANDTOOLS(p1, p2, p3) {
  106.   DoA3(this.r3obj, 187011, p1, R3TID_INTEGER, 0, p2, R3TID_STRING, 0, p3, R3TID_INTEGER, 0);
  107. }
  108.  
  109. // Description: Write default tool options to a file.
  110. // Returns: Boolean, true if succeeded
  111.  
  112. R3TOOLM_WRITEDEFAULTS = 187012;
  113.  
  114. function mR3TOOLM_WRITEDEFAULTS() {
  115.   return   DoA(this.r3obj, 187012, 0, R3TID_INTEGER, 0);
  116. }
  117.  
  118. // Description: Read default tool options from a file.
  119. // Returns: Boolean, true if succeeded
  120.  
  121. R3TOOLM_READDEFAULTS = 187013;
  122.  
  123. function mR3TOOLM_READDEFAULTS() {
  124.   return   DoA(this.r3obj, 187013, 0, R3TID_INTEGER, 0);
  125. }
  126.  
  127. // Description: Set current defaults options to the tool's interactor. This method is defined by the
  128. //      r3tool base class but it is up to the sub class to implement this.
  129. // Virtual method
  130. // Returns: Boolean, true if succeeded
  131.  
  132. R3TOOLM_SETDEFAULTS = 187014;
  133.  
  134. function mR3TOOLM_SETDEFAULTS() {
  135.   return   DoA(this.r3obj, 187014, 0, R3TID_INTEGER, 0);
  136. }
  137.  
  138. // Description: Read all interactor's options. These are used as default options next time the tool
  139. //      is activated. This method is defined by the r3tool base class but implemented by the
  140. //      sub classes.
  141. // Virtual method
  142. // Returns: Boolean, true if succeeded
  143.  
  144. R3TOOLM_GETDEFAULTS = 187015;
  145.  
  146. function mR3TOOLM_GETDEFAULTS() {
  147.   return   DoA(this.r3obj, 187015, 0, R3TID_INTEGER, 0);
  148. }
  149.  
  150. // Description: returns description text for the tool. This string can be used in menus and
  151. //      other GUI elements allowing more descriptive texts.
  152. // Returns: String, address of the tool description
  153.  
  154. R3TOOLCM_GETLONGDESCRIPTION = 187016;
  155.  
  156. function mR3TOOLCM_GETLONGDESCRIPTION() {
  157.   return   DoA(this.r3obj, 187016, 0, R3TID_INTEGER, 0);
  158. }
  159.  
  160. // Description: returns description text for the tool. This string can be used in menus and
  161. //      other GUI elements allowing more descriptive texts.
  162. // Returns: String, address of the tool description
  163.  
  164. R3TOOLCM_GETDESCRIPTION = 187017;
  165.  
  166. function mR3TOOLCM_GETDESCRIPTION() {
  167.   return   DoA(this.r3obj, 187017, 0, R3TID_INTEGER, 0);
  168. }
  169.  
  170. // Description: creates interactor for the tool class
  171. // p3: Object, current layer    
  172.  
  173. R3TOOLCM_CREATEINTERACTOR = 187020;
  174.  
  175. function mR3TOOLCM_CREATEINTERACTOR(p3) {
  176.   DoA(this.r3obj, 187020, p3, R3TID_OBJECT, 0);
  177. }
  178.  
  179. // Description: Check if the new tool should replace the current tool.
  180. // Returns: Boolean, TRUE if the new tool should replace the current tool. FALSE if the new
  181. //      tool should be pushed on top of the tool stack.
  182.  
  183. R3TOOLM_GETREPLACEOPT = 187022;
  184.  
  185. function mR3TOOLM_GETREPLACEOPT() {
  186.   return   DoA(this.r3obj, 187022, 0, R3TID_INTEGER, 0);
  187. }
  188.  
  189.  
  190.  
  191.  
  192. R3TOOLA_Layer = 187500;
  193. function SetR3TOOLA_Layer(value) {
  194.   R3Set(this.r3obj, R3TOOLA_Layer, value, R3TID_OBJECT, 0); 
  195. }
  196.  
  197. function GetR3TOOLA_Layer() {
  198.   return R3ToJS(R3Get(this.r3obj, R3TOOLA_Layer, R3TID_OBJECT, 0)); 
  199. }
  200.  
  201. R3TOOLA_UnitConverter = 187501;
  202. function SetR3TOOLA_UnitConverter(value) {
  203.   R3Set(this.r3obj, R3TOOLA_UnitConverter, value, R3TID_OBJECT, 0); 
  204. }
  205.  
  206. function GetR3TOOLA_UnitConverter() {
  207.   return R3ToJS(R3Get(this.r3obj, R3TOOLA_UnitConverter, R3TID_OBJECT, 0)); 
  208. }
  209.  
  210. R3TOOLA_Interactor = 187502;
  211. function GetR3TOOLA_Interactor() {
  212.   return R3ToJS(R3Get(this.r3obj, R3TOOLA_Interactor, R3TID_OBJECT, 0)); 
  213. }
  214.  
  215. R3TOOLA_Active = 187505;
  216. function SetR3TOOLA_Active(value) {
  217.   R3Set(this.r3obj, R3TOOLA_Active, value, R3TID_INTEGER, 0); 
  218. }
  219.  
  220. function GetR3TOOLA_Active() {
  221.   return R3Get(this.r3obj, R3TOOLA_Active, R3TID_INTEGER, 0); 
  222. }
  223.  
  224. var R3TOOLA_CtrlWindow_removed = 187506; // Object
  225. var R3TOOLA_StatusWindow_removed = 187507; // Object
  226. R3TOOLA_Identifier = 187508;
  227. function SetR3TOOLA_Identifier(value) {
  228.   R3Set(this.r3obj, R3TOOLA_Identifier, value, R3TID_INTEGER, 0); 
  229. }
  230.  
  231. function GetR3TOOLA_Identifier() {
  232.   return R3Get(this.r3obj, R3TOOLA_Identifier, R3TID_INTEGER, 0); 
  233. }
  234.  
  235. var R3TOOL_MAXTOOLCOUNT = 2000;
  236. var R3TOOL_MAXGROUPCOUNT = 200;
  237. var R3TOOLORIENTATION_VERTICAL = 0;
  238. var R3TOOLORIENTATION_HORIZONTAL = 1;
  239. var R3TOOLS_CANNOTGETDEFAULTS = 0;
  240. var R3TOOLS_CANNOTSETDEFAULTS = 1;
  241. var R3TOOLS_PRIVATE = 10;
  242.  
  243.  
  244. function r3Tool () { 
  245.    this.base = r3God;
  246.    if(arguments.length) {
  247.       this.base(R3CLID_TOOL, arguments);
  248.    }
  249.    // Methods
  250.    this.ACTION=mR3TOOLM_ACTION;
  251.    this.INSTALLTOOLCLASS=mR3TOOLCM_INSTALLTOOLCLASS;
  252.    this.ENUMTOOLCLASSES=mR3TOOLCM_ENUMTOOLCLASSES;
  253.    this.INSTALLTOOLGROUP=mR3TOOLCM_INSTALLTOOLGROUP;
  254.    this.SHOWMESSAGE=mR3TOOLM_SHOWMESSAGE;
  255.    this.SETCONTROLORIENTATIO=mR3TOOLM_SETCONTROLORIENTATIO;
  256.    this.SETSTATUSORIENTATION=mR3TOOLM_SETSTATUSORIENTATION;
  257.    this.MAKEDEFAULTS=mR3TOOLM_MAKEDEFAULTS;
  258.    this.ENUMGROUPSANDTOOLS=mR3TOOLCM_ENUMGROUPSANDTOOLS;
  259.    this.WRITEDEFAULTS=mR3TOOLM_WRITEDEFAULTS;
  260.    this.READDEFAULTS=mR3TOOLM_READDEFAULTS;
  261.    this.SETDEFAULTS=mR3TOOLM_SETDEFAULTS;
  262.    this.GETDEFAULTS=mR3TOOLM_GETDEFAULTS;
  263.    this.GETLONGDESCRIPTION=mR3TOOLCM_GETLONGDESCRIPTION;
  264.    this.GETDESCRIPTION=mR3TOOLCM_GETDESCRIPTION;
  265.    this.CREATEINTERACTOR=mR3TOOLCM_CREATEINTERACTOR;
  266.    this.GETREPLACEOPT=mR3TOOLM_GETREPLACEOPT;
  267.  
  268.    // Attributes
  269.    this.GetLayer=GetR3TOOLA_Layer;
  270.    this.SetLayer=SetR3TOOLA_Layer;
  271.    this.GetUnitConverter=GetR3TOOLA_UnitConverter;
  272.    this.SetUnitConverter=SetR3TOOLA_UnitConverter;
  273.    this.GetInteractor=GetR3TOOLA_Interactor;
  274.    this.GetActive=GetR3TOOLA_Active;
  275.    this.SetActive=SetR3TOOLA_Active;
  276.    this.GetIdentifier=GetR3TOOLA_Identifier;
  277.    this.SetIdentifier=SetR3TOOLA_Identifier;
  278. }
  279.  
  280. r3Tool.prototype=new r3Button;
  281. // r3tool.h_H